package com.tanhua.api.db;

import com.tanhua.db.UserInfo;
import com.tanhua.mapper.UserInfoMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserInfoApiImpl implements UserInfoApi {

    @Autowired
    private UserInfoMapper userInfoMapper;

    /**
     * @Param: [userInfo]
     * @return: void
     * @Description: 保存用户的基本信息
     */
    @Override
    public void saveUserInfo(UserInfo userInfo) {
        userInfoMapper.insert(userInfo);
    }

    /**
     * @Param: [userInfo]
     * @return: void
     * @Description: 完善用户信息  更新 头像地址
     */
    @Override
    public void updateUserInfo(UserInfo userInfo) {
        userInfoMapper.updateById(userInfo);
    }
}
